package com.lam.mall.entity;

import com.lam.common.validate.group.Add;
import javax.validation.constraints.Size;
import javax.validation.constraints.NotBlank;
import java.util.Date;
import com.lam.common.validate.annotation.DictCheck;
import com.lam.common.utils.DateUtil;
import com.lam.common.validate.annotation.DictValid;
import com.fasterxml.jackson.annotation.JsonFormat;
import javax.validation.constraints.NotNull;
import com.lam.common.components.dict.annotation.Dict;
import com.baomidou.mybatisplus.annotation.TableField;
import javax.validation.constraints.Null;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.lam.common.base.domain.BaseEntity;
import com.baomidou.mybatisplus.annotation.FieldFill;

/**
 * 商品分组对象 mall_prod_tag
 * 
 * @author admin
 * @date 2023-04-20
 */
@DictCheck
@TableName("mall_prod_tag")
public class ProdTag implements BaseEntity{

    /** 主键 */
    @Null(groups = Add.class, message="id必须为空")
    @TableId(type = IdType.ASSIGN_ID)
    private String id;
    
    /** 分组标题 */
    @NotBlank(message = "分组标题不能为空")
    @Size(max = 36, message = "分组标题长度不能超过36个字符")
    private String title;

    /** 店铺Id */
    private String shopId;

    /** 状态(1为正常,0为删除) */
    @NotNull(message = "状态不能为空")
    @DictValid(message = "无效的状态")
    @Dict(dictCode = "status_type")
    private Integer status;

    /** 默认类型(0:商家自定义,1:系统默认) */
    @DictValid(message = "无效的默认类型")
    @Dict(dictCode = "is_default_type")
    private Integer isDefault;

    /** 商品数量 */
    private Long prodCount;

    /** 列表样式(0:一列一个,1:一列两个,2:一列三个) */
    @NotNull(message = "列表样式不能为空")
    @DictValid(message = "无效的列表样式")
    @Dict(dictCode = "style_type")
    private Integer style;

    /** 排序 */
    private Integer seq;

    /** 创建时间 */
    @JsonFormat(pattern = DateUtil.PATTERN_DEFAULT)
    @TableField(fill = FieldFill.INSERT)
    private Date createTime;

    /** 修改时间 */
    @JsonFormat(pattern = DateUtil.PATTERN_DEFAULT)
    @TableField(fill = FieldFill.UPDATE)
    private Date updateTime;

    /** 删除时间 */
    @JsonFormat(pattern = DateUtil.PATTERN_DEFAULT)
    private Date deleteTime;

    public void setId(String id) {
        this.id = id;
    }

    public String getId() {
        return id;
    } 

    public void setTitle(String title) {
        this.title = title;
    }

    public String getTitle() {
        return title;
    }    
    
    public void setShopId(String shopId) {
        this.shopId = shopId;
    }

    public String getShopId() {
        return shopId;
    }    
    
    public void setStatus(Integer status) {
        this.status = status;
    }

    public Integer getStatus() {
        return status;
    }    
    
    public void setIsDefault(Integer isDefault) {
        this.isDefault = isDefault;
    }

    public Integer getIsDefault() {
        return isDefault;
    }    
    
    public void setProdCount(Long prodCount) {
        this.prodCount = prodCount;
    }

    public Long getProdCount() {
        return prodCount;
    }    
    
    public void setStyle(Integer style) {
        this.style = style;
    }

    public Integer getStyle() {
        return style;
    }    
    
    public void setSeq(Integer seq) {
        this.seq = seq;
    }

    public Integer getSeq() {
        return seq;
    }    
    
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getCreateTime() {
        return createTime;
    }    
    
    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    public Date getUpdateTime() {
        return updateTime;
    }    
    
    public void setDeleteTime(Date deleteTime) {
        this.deleteTime = deleteTime;
    }

    public Date getDeleteTime() {
        return deleteTime;
    }    
    

}
